export interface environment {
  api_domain: string,
  openid: string|null,
  userInfo?: userInfo|null,
  localUserInfo?: localUserInfo|null
  token: string,
  tokenExpTime?: number
}

export interface userInfo {
    openid: string
    nickname: string
    language: string
    city: string
    province: string
    country: string
    avatar_url: string
    username: string
}

export interface localUserInfo {
    avatarUrl: string
    city: string
    country: string
    gender: number
    language: string
    nickName: string
    province: string
}

export interface requestObjectInterface{
  header?: any,
  method?:
  | 'OPTIONS'
  | 'GET'
  | 'HEAD'
  | 'POST'
  | 'PUT'
  | 'DELETE'
  | 'TRACE'
  | 'CONNECT',
  domain: string,
  url?: string,
  data?: any,
  dataType?: string,
  authorization?: string
}

export interface Response {
  data: {
    code: number,
    message: string,
    data: any
  }
}

export class RequestObject implements requestObjectInterface
{
  domain:string = ''
  dataType:string = 'json'
  authorization:string = ''
}